#!/usr/bin/python
# pylint: disable-msg = W0102
'''
Created by Colin Gillespie <c.gillespie@ncl.ac.uk>
$LastChangedDate: 2008-03-13 19:50:58 +0000 (Thu, 13 Mar 2008) $

Used to keep track of the swiginac variables

'''

__revision__ = '$Rev: 73 $'

from swiginac import symbol
from ClosureMethods import ClosureVariables

class Variables(object):

    def __init__(self):
        pass
        
    def initialise(self):
        self.getParameter()
        self.var_dict.clear()
        ClosureVariables().initialise()
        return True
    
    def __putParameter(self, variable):
        self.var_dict[variable] = symbol(str(variable))
        return True
    
    
    def getParameter(self, variable=None, var_dict={}):
        self.var_dict = var_dict
        if not variable:
            return None
        
        if not self.var_dict.has_key(variable):
            self.__putParameter(variable)
            
        return self.var_dict[variable]
    
    
    def getMoment(self, variable):
        return ClosureVariables().getMoment(variable)
    
    def getCumulant(self, variable):
        return ClosureVariables().getCumulant(variable)
    








